wayland: Make popups work more than once
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 May 2019 04:41:38 +0000 (04:41 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 19 May 2019 04:43:16 +0000 (04:43 +0000)
The change to keep some server resources around
until destroy was causing us to not recreate
the right things when a surface is hidden and
then shown again. Make sure to recreate everything.

gdk/wayland/gdksurface-wayland.c

index c192c3b09d4c1a0b1862fbf4e9efeb7989821253..72622e01708095880ae3a9469db5864733328733 100644 (file)
@@ -2514,12 +2514,16 @@ gdk_wayland_surface_map (GdkSurface *surface)
   impl->mapped = TRUE;
 }
 
+static void gdk_wayland_surface_destroy_surface (GdkSurface *surface);
+
 static void
 gdk_wayland_surface_show (GdkSurface *surface,
                           gboolean    already_mapped)
 {
   GdkSurfaceImplWayland *impl = GDK_SURFACE_IMPL_WAYLAND (surface->impl);
 
+  gdk_wayland_surface_destroy_surface (surface);
+
   if (!impl->display_server.wl_surface)
     gdk_wayland_surface_create_surface (surface);